package com.hakim.wfb.admin.enums;

/**
 *
 */
public enum RegionEnum {

    PROVINCE(0, "省级城市"),
    CITY(1, "市级城市"),
    AREA(2, "县，区级城市"),;

    /**
     * 值
     */
    private int code;
    /**
     * 注释
     */
    private String message;

    private RegionEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public static RegionEnum getByCode(int code) {
        for (RegionEnum type : values()) {
            if (type.getCode() == (code)) {
                return type;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
